<template>
  <div>
    <el-row>
      <el-col :span="24">
        <div class="header">
          <el-breadcrumb>
            <el-breadcrumb-item :to="{ path: '/coldata' }"
              ><span class="navigation">企业账号列表</span></el-breadcrumb-item
            >
            <el-breadcrumb-item
              ><span class="navigation">使用详情</span></el-breadcrumb-item
            >
          </el-breadcrumb>
          <div class="title">
            <div class="logo">
              <img src="@/assets/img/lian.png" />
              <h1>包头联通</h1>
            </div>
            <div>
              <el-button type="primary">取消收藏</el-button>
            </div>
          </div>
          <div class="itemAll">
            <div class="item" v-for="item in detail" :key="item">
              {{ item.title }}{{ item.content }}
            </div>
            <div class="tip">
              <el-tooltip
                class="item"
                effect="light"
                content="Left Center 提示文字"
                placement="left"
              >
                <span>>>查看详情</span>
              </el-tooltip>
            </div>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <div class="date">
          <el-date-picker
            v-model="value1"
            type="datetimerange"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            :default-time="['12:00:00']"
          >
          </el-date-picker>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <div class="detail">
          <div class="taskdetail">业务详情</div>
          <div class="detail-header">
            <div class="taskNum">
              <h3>期间使用业务数</h3>
              <span>12</span>
            </div>
            <div class="rate">
              <h3>平均通过率</h3>
              <span>36%</span>
            </div>
          </div>
          <div>
            <el-table
              :data="tableData"
              style="width: 100%"
              empty-text="暂无数据"
            >
              <el-table-column prop="name" label="业务名称" width="250">
              </el-table-column>
              <el-table-column prop="rule" label="业务规则" width="780">
                <template #default="scope">
                  <el-tag
                    class="tag"
                    v-for="item in scope.row.rule"
                    :key="item"
                  >
                    {{ item }}
                  </el-tag>
                </template>
              </el-table-column>
              <el-table-column prop="num" label="质检次数"> </el-table-column>
              <el-table-column prop="rate" label="通过率"> </el-table-column>
            </el-table>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="12">
        <div class="fileNum">
          <h3>期间质检文件数</h3>
          <span>12</span>
          <BarViewType2 :show="0" />
        </div>
      </el-col>
      <el-col :span="12">
        <div class="ruleNum">
          <h3>期间使用质检规则数</h3>
          <span>12</span>
          <BarViewType2 :show="1" />
        </div>
      </el-col>
    </el-row>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
export default defineComponent({
  setup() {
    let tableData = ref([]);
    let detail: any = ref([]);
    let value1 = ref("");
    return {
      tableData,
      detail,
      value1,
    };
  },
});
</script>

<style lang="scss" scoped>
.fileNum {
  height: auto;
  padding: 20px;
  background-color: white;
  margin-right: 20px;
  span {
    color: #175594;
    font-size: 25px;
    font-weight: bolder;
  }
}
.ruleNum {
  height: auto;
  padding: 20px;
  background-color: white;
  span {
    color: #175594;
    font-size: 25px;
    font-weight: bolder;
  }
}
.tag {
  margin-right: 15px;
  font-size: 15px;
  color: rgb(41, 43, 41);
  background-color: rgb(173, 253, 247);
}
.itemAll {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  .tip {
    position: absolute;
    right: 15px;
    bottom: 15px;
  }
  .item {
    width: 30%;
    margin-right: 30px;
    font-size: 20px;
    margin-bottom: 20px;
  }
}
.header {
  height: auto;
  padding: 20px;
  background-color: white;
  .navigation {
    color: #175594;
    font-size: 20px;
    font-weight: bolder;
  }
}
.title {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  .el-button {
    background-color: #175594;
    margin-right: 20px;
  }
  .logo {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    img {
      margin-top: 15px;
    }
    h1 {
      margin-left: 15px;
      margin-top: 50px;
      color: #175594;
    }
  }
}
.date {
  padding: 20px;
  margin-top: 20px;
  background-color: white;
  height: auto;
  margin-bottom: 20px;
}
.detail {
  padding: 20px;
  background-color: white;
  height: auto;
  margin-bottom: 20px;
  .taskdetail {
    font-size: 25px;
    color: #175594;
    font-weight: bolder;
    margin-bottom: 15px;
  }
  .detail-header {
    display: flex;
    align-items: center;
    flex-direction: row;
    .taskNum {
      margin-right: 80px;
      span {
        font-size: 25px;
        color: #175594;
        font-weight: bolder;
      }
    }
    .rate {
      span {
        font-size: 25px;
        color: #175594;
        font-weight: bolder;
      }
    }
  }
}
</style>
